package com.we.risk.plist;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.*;

import static com.we.risk.plist.utils.PlistTools.*;

public class AppCategoryBasicInfo {
    public static Logger LOG = LoggerFactory.getLogger(AppCategoryBasicInfo.class);

    //    public static final String INSTDLIST = "inst_d";
    //    public static final String INSTMLIST = "inst_m";
    //    public static final String UPDTDLIST = "updt_d";
    //    public static final String UPDTMLIST = "updt_m";
    public static final String RTEEND = "_rte";
    /** basicMap calcu numbers */
    public static final String ALLSET = "";

    public static final String INSTH1_6 = "inst_h1_6";
    public static final String INSTH7_12 = "inst_h7_12";
    public static final String INSTH13_18 = "inst_h13_18";
    public static final String INSTH19_24 = "inst_h19_24";
    public static final String UPDTH1_6 = "updt_h1_6";
    public static final String UPDTH7_12 = "updt_h7_12";
    public static final String UPDTH13_18 = "updt_h13_18";
    public static final String UPDTH19_24 = "updt_h19_24";

    // inst
    // bank_inst_d_cnt_0th_rte = bank_inst_d_cnt_0th/tot_inst_d_cnt_0th
    public static final String INSTDCNT0TH = "inst_d_cnt_0th";
    public static final String INSTDCNT1TH = "inst_d_cnt_1th";
    public static final String INSTDCNT2TH = "inst_d_cnt_2th";
    public static final String INSTDCNT3TH = "inst_d_cnt_3th";
    public static final String INSTDCNT4TH = "inst_d_cnt_4th";
    public static final String INSTDCNT5TH = "inst_d_cnt_5th";
    public static final String INSTDCNT6TH = "inst_d_cnt_6th";
    public static final String INSTDCNT7TH = "inst_d_cnt_7th";
    public static final String INSTDCNT3 = "inst_d_cnt_3";
    public static final String INSTDCNT5 = "inst_d_cnt_5";
    public static final String INSTDCNT7 = "inst_d_cnt_7";
    public static final String INSTDCNT10 = "inst_d_cnt_10";
    public static final String INSTDCNT15 = "inst_d_cnt_15";
    public static final String INSTMCNT1TH = "inst_m_cnt_1th";
    public static final String INSTMCNT2TH = "inst_m_cnt_2th";
    public static final String INSTMCNT3TH = "inst_m_cnt_3th";
    public static final String INSTMCNT4TH = "inst_m_cnt_4th";
    public static final String INSTMCNT5TH = "inst_m_cnt_5th";
    public static final String INSTMCNT6TH = "inst_m_cnt_6th";
    public static final String INSTMCNT3 = "inst_m_cnt_3";
    public static final String INSTMCNT6 = "inst_m_cnt_6";
    public static final String INSTMCNT9 = "inst_m_cnt_9";
    public static final String INSTMCNT12 = "inst_m_cnt_12";
    public static final String INSTMCNT24 = "inst_m_cnt_24";

    // bank_inst_d_rte_0th = bank_inst_d_cnt_0th/all_bank_apk
    public static final String INSTDRTE0TH = "inst_d_rte_0th";
    public static final String INSTDRTE1TH = "inst_d_rte_1th";
    public static final String INSTDRTE2TH = "inst_d_rte_2th";
    public static final String INSTDRTE3TH = "inst_d_rte_3th";
    public static final String INSTDRTE4TH = "inst_d_rte_4th";
    public static final String INSTDRTE5TH = "inst_d_rte_5th";
    public static final String INSTDRTE6TH = "inst_d_rte_6th";
    public static final String INSTDRTE7TH = "inst_d_rte_7th";
    public static final String INSTDRTE3 = "inst_d_rte_3";
    public static final String INSTDRTE5 = "inst_d_rte_5";
    public static final String INSTDRTE7 = "inst_d_rte_7";
    public static final String INSTDRTE10 = "inst_d_rte_10";
    public static final String INSTDRTE15 = "inst_d_rte_15";
    public static final String INSTMRTE1TH = "inst_m_rte_1th";
    public static final String INSTMRTE2TH = "inst_m_rte_2th";
    public static final String INSTMRTE3TH = "inst_m_rte_3th";
    public static final String INSTMRTE4TH = "inst_m_rte_4th";
    public static final String INSTMRTE5TH = "inst_m_rte_5th";
    public static final String INSTMRTE6TH = "inst_m_rte_6th";
    public static final String INSTMRTE3 = "inst_m_rte_3";
    public static final String INSTMRTE6 = "inst_m_rte_6";
    public static final String INSTMRTE9 = "inst_m_rte_9";
    public static final String INSTMRTE12 = "inst_m_rte_12";
    public static final String INSTMRTE24 = "inst_m_rte_24";

    // updt
    public static final String UPDTDCNT0TH = "updt_d_cnt_0th";
    public static final String UPDTDCNT1TH = "updt_d_cnt_1th";
    public static final String UPDTDCNT2TH = "updt_d_cnt_2th";
    public static final String UPDTDCNT3TH = "updt_d_cnt_3th";
    public static final String UPDTDCNT4TH = "updt_d_cnt_4th";
    public static final String UPDTDCNT5TH = "updt_d_cnt_5th";
    public static final String UPDTDCNT6TH = "updt_d_cnt_6th";
    public static final String UPDTDCNT7TH = "updt_d_cnt_7th";
    public static final String UPDTDCNT3 = "updt_d_cnt_3";
    public static final String UPDTDCNT5 = "updt_d_cnt_5";
    public static final String UPDTDCNT7 = "updt_d_cnt_7";
    public static final String UPDTDCNT10 = "updt_d_cnt_10";
    public static final String UPDTDCNT15 = "updt_d_cnt_15";
    public static final String UPDTMCNT1TH = "updt_m_cnt_1th";
    public static final String UPDTMCNT2TH = "updt_m_cnt_2th";
    public static final String UPDTMCNT3TH = "updt_m_cnt_3th";
    public static final String UPDTMCNT4TH = "updt_m_cnt_4th";
    public static final String UPDTMCNT5TH = "updt_m_cnt_5th";
    public static final String UPDTMCNT6TH = "updt_m_cnt_6th";
    public static final String UPDTMCNT3 = "updt_m_cnt_3";
    public static final String UPDTMCNT6 = "updt_m_cnt_6";
    public static final String UPDTMCNT9 = "updt_m_cnt_9";
    public static final String UPDTMCNT12 = "updt_m_cnt_12";
    public static final String UPDTMCNT24 = "updt_m_cnt_24";

    public static final String UPDTDRTE0TH = "updt_d_rte_0th";
    public static final String UPDTDRTE1TH = "updt_d_rte_1th";
    public static final String UPDTDRTE2TH = "updt_d_rte_2th";
    public static final String UPDTDRTE3TH = "updt_d_rte_3th";
    public static final String UPDTDRTE4TH = "updt_d_rte_4th";
    public static final String UPDTDRTE5TH = "updt_d_rte_5th";
    public static final String UPDTDRTE6TH = "updt_d_rte_6th";
    public static final String UPDTDRTE7TH = "updt_d_rte_7th";
    public static final String UPDTDRTE3 = "updt_d_rte_3";
    public static final String UPDTDRTE5 = "updt_d_rte_5";
    public static final String UPDTDRTE7 = "updt_d_rte_7";
    public static final String UPDTDRTE10 = "updt_d_rte_10";
    public static final String UPDTDRTE15 = "updt_d_rte_15";
    public static final String UPDTMRTE1TH = "updt_m_rte_1th";
    public static final String UPDTMRTE2TH = "updt_m_rte_2th";
    public static final String UPDTMRTE3TH = "updt_m_rte_3th";
    public static final String UPDTMRTE4TH = "updt_m_rte_4th";
    public static final String UPDTMRTE5TH = "updt_m_rte_5th";
    public static final String UPDTMRTE6TH = "updt_m_rte_6th";
    public static final String UPDTMRTE3 = "updt_m_rte_3";
    public static final String UPDTMRTE6 = "updt_m_rte_6";
    public static final String UPDTMRTE9 = "updt_m_rte_9";
    public static final String UPDTMRTE12 = "updt_m_rte_12";
    public static final String UPDTMRTE24 = "updt_m_rte_24";

    public static final String ISAFTHFQINST = "aft_hfq";
    public static final String AFTHFQINSTDCNT0TH = "is_aft_hfq_inst_d_cnt_0th";
    public static final String AFTHFQINSTDCNT1TH = "is_aft_hfq_inst_d_cnt_1th";
    public static final String AFTHFQINSTDCNT2TH = "is_aft_hfq_inst_d_cnt_2th";
    public static final String AFTHFQINSTDCNT3TH = "is_aft_hfq_inst_d_cnt_3th";
    public static final String AFTHFQINSTDCNT4TH = "is_aft_hfq_inst_d_cnt_4th";
    public static final String AFTHFQINSTDCNT5TH = "is_aft_hfq_inst_d_cnt_5th";
    public static final String AFTHFQINSTDCNT6TH = "is_aft_hfq_inst_d_cnt_6th";
    public static final String AFTHFQINSTDCNT7TH = "is_aft_hfq_inst_d_cnt_7th";
    public static final String AFTHFQINSTDCNT3 = "is_aft_hfq_inst_d_cnt_3";
    public static final String AFTHFQINSTDCNT5 = "is_aft_hfq_inst_d_cnt_5";
    public static final String AFTHFQINSTDCNT7 = "is_aft_hfq_inst_d_cnt_7";
    public static final String AFTHFQINSTDCNT10 = "is_aft_hfq_inst_d_cnt_10";
    public static final String AFTHFQINSTDCNT15 = "is_aft_hfq_inst_d_cnt_15";
    public static final String AFTHFQINSTMCNT1TH = "is_aft_hfq_inst_m_cnt_1th";
    public static final String AFTHFQINSTMCNT2TH = "is_aft_hfq_inst_m_cnt_2th";
    public static final String AFTHFQINSTMCNT3TH = "is_aft_hfq_inst_m_cnt_3th";
    public static final String AFTHFQINSTMCNT4TH = "is_aft_hfq_inst_m_cnt_4th";
    public static final String AFTHFQINSTMCNT5TH = "is_aft_hfq_inst_m_cnt_5th";
    public static final String AFTHFQINSTMCNT6TH = "is_aft_hfq_inst_m_cnt_6th";

    public static final String AFTHFQINSTDDCNT2TH = "aft_hfq_inst_d_cnt_2th";
    public static final String AFTHFQINSTMMCNT2TH = "aft_hfq_inst_mm_cnt_2th";
    public static final String AFTHFQINSTMMCNT6TH = "aft_hfq_inst_mm_cnt_6th";

    public static final String AFTHFQINSTDRTE0TH = "is_aft_hfq_inst_d_rte_0th";
    public static final String AFTHFQINSTDRTE1TH = "is_aft_hfq_inst_d_rte_1th";
    public static final String AFTHFQINSTDRTE2TH = "is_aft_hfq_inst_d_rte_2th";
    public static final String AFTHFQINSTDRTE3TH = "is_aft_hfq_inst_d_rte_3th";
    public static final String AFTHFQINSTDRTE4TH = "is_aft_hfq_inst_d_rte_4th";
    public static final String AFTHFQINSTDRTE5TH = "is_aft_hfq_inst_d_rte_5th";
    public static final String AFTHFQINSTDRTE6TH = "is_aft_hfq_inst_d_rte_6th";
    public static final String AFTHFQINSTDRTE7TH = "is_aft_hfq_inst_d_rte_7th";
    public static final String AFTHFQINSTDRTE3 = "is_aft_hfq_inst_d_rte_3";
    public static final String AFTHFQINSTDRTE5 = "is_aft_hfq_inst_d_rte_5";
    public static final String AFTHFQINSTDRTE7 = "is_aft_hfq_inst_d_rte_7";
    public static final String AFTHFQINSTDRTE10 = "is_aft_hfq_inst_d_rte_10";
    public static final String AFTHFQINSTDRTE15 = "is_aft_hfq_inst_d_rte_15";
    public static final String AFTHFQINSTMRTE1TH = "is_aft_hfq_inst_m_rte_1th";
    public static final String AFTHFQINSTMRTE2TH = "is_aft_hfq_inst_m_rte_2th";
    public static final String AFTHFQINSTMRTE3TH = "is_aft_hfq_inst_m_rte_3th";
    public static final String AFTHFQINSTMRTE4TH = "is_aft_hfq_inst_m_rte_4th";
    public static final String AFTHFQINSTMRTE5TH = "is_aft_hfq_inst_m_rte_5th";
    public static final String AFTHFQINSTMRTE6TH = "is_aft_hfq_inst_m_rte_6th";

    public static final String AFTHFQUPDTDCNT0TH = "is_aft_hfq_updt_d_cnt_0th";
    public static final String AFTHFQUPDTDCNT1TH = "is_aft_hfq_updt_d_cnt_1th";
    public static final String AFTHFQUPDTDCNT2TH = "is_aft_hfq_updt_d_cnt_2th";
    public static final String AFTHFQUPDTDCNT3TH = "is_aft_hfq_updt_d_cnt_3th";
    public static final String AFTHFQUPDTDCNT4TH = "is_aft_hfq_updt_d_cnt_4th";
    public static final String AFTHFQUPDTDCNT5TH = "is_aft_hfq_updt_d_cnt_5th";
    public static final String AFTHFQUPDTDCNT6TH = "is_aft_hfq_updt_d_cnt_6th";
    public static final String AFTHFQUPDTDCNT7TH = "is_aft_hfq_updt_d_cnt_7th";
    public static final String AFTHFQUPDTDCNT3 = "is_aft_hfq_updt_d_cnt_3";
    public static final String AFTHFQUPDTDCNT5 = "is_aft_hfq_updt_d_cnt_5";
    public static final String AFTHFQUPDTDCNT7 = "is_aft_hfq_updt_d_cnt_7";
    public static final String AFTHFQUPDTDCNT10 = "is_aft_hfq_updt_d_cnt_10";
    public static final String AFTHFQUPDTDCNT15 = "is_aft_hfq_updt_d_cnt_15";
    public static final String AFTHFQUPDTMCNT1TH = "is_aft_hfq_updt_m_cnt_1th";
    public static final String AFTHFQUPDTMCNT2TH = "is_aft_hfq_updt_m_cnt_2th";
    public static final String AFTHFQUPDTMCNT3TH = "is_aft_hfq_updt_m_cnt_3th";
    public static final String AFTHFQUPDTMCNT4TH = "is_aft_hfq_updt_m_cnt_4th";
    public static final String AFTHFQUPDTMCNT5TH = "is_aft_hfq_updt_m_cnt_5th";
    public static final String AFTHFQUPDTMCNT6TH = "is_aft_hfq_updt_m_cnt_6th";

    public static final String AFTHFQUPDTDRTE0TH = "is_aft_hfq_updt_d_rte_0th";
    public static final String AFTHFQUPDTDRTE1TH = "is_aft_hfq_updt_d_rte_1th";
    public static final String AFTHFQUPDTDRTE2TH = "is_aft_hfq_updt_d_rte_2th";
    public static final String AFTHFQUPDTDRTE3TH = "is_aft_hfq_updt_d_rte_3th";
    public static final String AFTHFQUPDTDRTE4TH = "is_aft_hfq_updt_d_rte_4th";
    public static final String AFTHFQUPDTDRTE5TH = "is_aft_hfq_updt_d_rte_5th";
    public static final String AFTHFQUPDTDRTE6TH = "is_aft_hfq_updt_d_rte_6th";
    public static final String AFTHFQUPDTDRTE7TH = "is_aft_hfq_updt_d_rte_7th";
    public static final String AFTHFQUPDTDRTE3 = "is_aft_hfq_updt_d_rte_3";
    public static final String AFTHFQUPDTDRTE5 = "is_aft_hfq_updt_d_rte_5";
    public static final String AFTHFQUPDTDRTE7 = "is_aft_hfq_updt_d_rte_7";
    public static final String AFTHFQUPDTDRTE10 = "is_aft_hfq_updt_d_rte_10";
    public static final String AFTHFQUPDTDRTE15 = "is_aft_hfq_updt_d_rte_15";
    public static final String AFTHFQUPDTMRTE1TH = "is_aft_hfq_updt_m_rte_1th";
    public static final String AFTHFQUPDTMRTE2TH = "is_aft_hfq_updt_m_rte_2th";
    public static final String AFTHFQUPDTMRTE3TH = "is_aft_hfq_updt_m_rte_3th";
    public static final String AFTHFQUPDTMRTE4TH = "is_aft_hfq_updt_m_rte_4th";
    public static final String AFTHFQUPDTMRTE5TH = "is_aft_hfq_updt_m_rte_5th";
    public static final String AFTHFQUPDTMRTE6TH = "is_aft_hfq_updt_m_rte_6th";

    public static final String ISBFHFQINST = "bf_hfq";
    public static final String BFHFQINSTDCNT0TH = "is_bf_hfq_inst_d_cnt_0th";
    public static final String BFHFQINSTDCNT1TH = "is_bf_hfq_inst_d_cnt_1th";
    public static final String BFHFQINSTDCNT2TH = "is_bf_hfq_inst_d_cnt_2th";
    public static final String BFHFQINSTDCNT3TH = "is_bf_hfq_inst_d_cnt_3th";
    public static final String BFHFQINSTDCNT4TH = "is_bf_hfq_inst_d_cnt_4th";
    public static final String BFHFQINSTDCNT5TH = "is_bf_hfq_inst_d_cnt_5th";
    public static final String BFHFQINSTDCNT6TH = "is_bf_hfq_inst_d_cnt_6th";
    public static final String BFHFQINSTDCNT7TH = "is_bf_hfq_inst_d_cnt_7th";
    public static final String BFHFQINSTDCNT3 = "is_bf_hfq_inst_d_cnt_3";
    public static final String BFHFQINSTDCNT5 = "is_bf_hfq_inst_d_cnt_5";
    public static final String BFHFQINSTDCNT7 = "is_bf_hfq_inst_d_cnt_7";
    public static final String BFHFQINSTDCNT10 = "is_bf_hfq_inst_d_cnt_10";
    public static final String BFHFQINSTDCNT15 = "is_bf_hfq_inst_d_cnt_15";
    public static final String BFHFQINSTMCNT1TH = "is_bf_hfq_inst_m_cnt_1th";
    public static final String BFHFQINSTMCNT2TH = "is_bf_hfq_inst_m_cnt_2th";
    public static final String BFHFQINSTMCNT3TH = "is_bf_hfq_inst_m_cnt_3th";
    public static final String BFHFQINSTMCNT4TH = "is_bf_hfq_inst_m_cnt_4th";
    public static final String BFHFQINSTMCNT5TH = "is_bf_hfq_inst_m_cnt_5th";
    public static final String BFHFQINSTMCNT6TH = "is_bf_hfq_inst_m_cnt_6th";

    public static final String BFHFQINSTDRTE0TH = "is_bf_hfq_inst_d_rte_0th";
    public static final String BFHFQINSTDRTE1TH = "is_bf_hfq_inst_d_rte_1th";
    public static final String BFHFQINSTDRTE2TH = "is_bf_hfq_inst_d_rte_2th";
    public static final String BFHFQINSTDRTE3TH = "is_bf_hfq_inst_d_rte_3th";
    public static final String BFHFQINSTDRTE4TH = "is_bf_hfq_inst_d_rte_4th";
    public static final String BFHFQINSTDRTE5TH = "is_bf_hfq_inst_d_rte_5th";
    public static final String BFHFQINSTDRTE6TH = "is_bf_hfq_inst_d_rte_6th";
    public static final String BFHFQINSTDRTE7TH = "is_bf_hfq_inst_d_rte_7th";
    public static final String BFHFQINSTDRTE3 = "is_bf_hfq_inst_d_rte_3";
    public static final String BFHFQINSTDRTE5 = "is_bf_hfq_inst_d_rte_5";
    public static final String BFHFQINSTDRTE7 = "is_bf_hfq_inst_d_rte_7";
    public static final String BFHFQINSTDRTE10 = "is_bf_hfq_inst_d_rte_10";
    public static final String BFHFQINSTDRTE15 = "is_bf_hfq_inst_d_rte_15";
    public static final String BFHFQINSTMRTE1TH = "is_bf_hfq_inst_m_rte_1th";
    public static final String BFHFQINSTMRTE2TH = "is_bf_hfq_inst_m_rte_2th";
    public static final String BFHFQINSTMRTE3TH = "is_bf_hfq_inst_m_rte_3th";
    public static final String BFHFQINSTMRTE4TH = "is_bf_hfq_inst_m_rte_4th";
    public static final String BFHFQINSTMRTE5TH = "is_bf_hfq_inst_m_rte_5th";
    public static final String BFHFQINSTMRTE6TH = "is_bf_hfq_inst_m_rte_6th";

    public static final String BFHFQUPDTDCNT0TH = "is_bf_hfq_updt_d_cnt_0th";
    public static final String BFHFQUPDTDCNT1TH = "is_bf_hfq_updt_d_cnt_1th";
    public static final String BFHFQUPDTDCNT2TH = "is_bf_hfq_updt_d_cnt_2th";
    public static final String BFHFQUPDTDCNT3TH = "is_bf_hfq_updt_d_cnt_3th";
    public static final String BFHFQUPDTDCNT4TH = "is_bf_hfq_updt_d_cnt_4th";
    public static final String BFHFQUPDTDCNT5TH = "is_bf_hfq_updt_d_cnt_5th";
    public static final String BFHFQUPDTDCNT6TH = "is_bf_hfq_updt_d_cnt_6th";
    public static final String BFHFQUPDTDCNT7TH = "is_bf_hfq_updt_d_cnt_7th";
    public static final String BFHFQUPDTDCNT3 = "is_bf_hfq_updt_d_cnt_3";
    public static final String BFHFQUPDTDCNT5 = "is_bf_hfq_updt_d_cnt_5";
    public static final String BFHFQUPDTDCNT7 = "is_bf_hfq_updt_d_cnt_7";
    public static final String BFHFQUPDTDCNT10 = "is_bf_hfq_updt_d_cnt_10";
    public static final String BFHFQUPDTDCNT15 = "is_bf_hfq_updt_d_cnt_15";
    public static final String BFHFQUPDTMCNT1TH = "is_bf_hfq_updt_m_cnt_1th";
    public static final String BFHFQUPDTMCNT2TH = "is_bf_hfq_updt_m_cnt_2th";
    public static final String BFHFQUPDTMCNT3TH = "is_bf_hfq_updt_m_cnt_3th";
    public static final String BFHFQUPDTMCNT4TH = "is_bf_hfq_updt_m_cnt_4th";
    public static final String BFHFQUPDTMCNT5TH = "is_bf_hfq_updt_m_cnt_5th";
    public static final String BFHFQUPDTMCNT6TH = "is_bf_hfq_updt_m_cnt_6th";

    public static final String BFHFQUPDTDRTE0TH = "is_bf_hfq_updt_d_rte_0th";
    public static final String BFHFQUPDTDRTE1TH = "is_bf_hfq_updt_d_rte_1th";
    public static final String BFHFQUPDTDRTE2TH = "is_bf_hfq_updt_d_rte_2th";
    public static final String BFHFQUPDTDRTE3TH = "is_bf_hfq_updt_d_rte_3th";
    public static final String BFHFQUPDTDRTE4TH = "is_bf_hfq_updt_d_rte_4th";
    public static final String BFHFQUPDTDRTE5TH = "is_bf_hfq_updt_d_rte_5th";
    public static final String BFHFQUPDTDRTE6TH = "is_bf_hfq_updt_d_rte_6th";
    public static final String BFHFQUPDTDRTE7TH = "is_bf_hfq_updt_d_rte_7th";
    public static final String BFHFQUPDTDRTE3 = "is_bf_hfq_updt_d_rte_3";
    public static final String BFHFQUPDTDRTE5 = "is_bf_hfq_updt_d_rte_5";
    public static final String BFHFQUPDTDRTE7 = "is_bf_hfq_updt_d_rte_7";
    public static final String BFHFQUPDTDRTE10 = "is_bf_hfq_updt_d_rte_10";
    public static final String BFHFQUPDTDRTE15 = "is_bf_hfq_updt_d_rte_15";
    public static final String BFHFQUPDTMRTE1TH = "is_bf_hfq_updt_m_rte_1th";
    public static final String BFHFQUPDTMRTE2TH = "is_bf_hfq_updt_m_rte_2th";
    public static final String BFHFQUPDTMRTE3TH = "is_bf_hfq_updt_m_rte_3th";
    public static final String BFHFQUPDTMRTE4TH = "is_bf_hfq_updt_m_rte_4th";
    public static final String BFHFQUPDTMRTE5TH = "is_bf_hfq_updt_m_rte_5th";
    public static final String BFHFQUPDTMRTE6TH = "is_bf_hfq_updt_m_rte_6th";
    /** singel Map */
    public static final String INSTDMIN = "inst_d_min";

    public static final String INSTDMAX = "inst_d_max";
    public static final String INSTDMED = "inst_d_medium";
    public static final String INSTMMIN = "inst_m_min";
    public static final String INSTMMAX = "inst_m_max";
    public static final String INSTMMED = "inst_m_medium";
    public static final String UPDTDMIN = "updt_d_min";
    public static final String UPDTDMAX = "updt_d_max";
    public static final String UPDTDMED = "updt_d_medium";
    public static final String UPDTMMIN = "updt_m_min";
    public static final String UPDTMMAX = "updt_m_max";
    public static final String UPDTMMED = "updt_m_medium";

    public static final String INSTDCNTMAX = "inst_d_cnt__max";
    public static final String INSTDCNTMIN = "inst_d_cnt__min";
    public static final String INSTDCNTAVG = "inst_d_cnt__avg";
    public static final String INSTDCNTNAVG = "inst_d_cnt__nonavg";
    public static final String INSTDCNT0CNT = "inst_d_cnt__0cnt";
    public static final String INSTDCNTCTS = "inst_d_cnt__cts";
    public static final String INSTDCNTSTD = "inst_d_cnt__std";
    public static final String INSTDCNTCVA = "inst_d_cnt__cva";
    public static final String INSTDCNTCVANEW = "inst_d_cnt__cva_new";
    public static final String INSTMCNTMAX = "inst_m_cnt__max";
    public static final String INSTMCNTMIN = "inst_m_cnt__min";
    public static final String INSTMCNTAVG = "inst_m_cnt__avg";
    public static final String INSTMCNTNAVG = "inst_m_cnt__nonavg";
    public static final String INSTMCNT0CNT = "inst_m_cnt__0cnt";
    public static final String INSTMCNTCTS = "inst_m_cnt__cts";
    public static final String INSTMCNTSTD = "inst_m_cnt__std";
    public static final String INSTMCNTCVA = "inst_m_cnt__cva";
    public static final String UPDTDCNTMAX = "updt_d_cnt__max";
    public static final String UPDTDCNTMIN = "updt_d_cnt__min";
    public static final String UPDTDCNTAVG = "updt_d_cnt__avg";
    public static final String UPDTDCNTNAVG = "updt_d_cnt__nonavg";
    public static final String UPDTDCNT0CNT = "updt_d_cnt__0cnt";
    public static final String UPDTDCNTCTS = "updt_d_cnt__cts";
    public static final String UPDTDCNTSTD = "updt_d_cnt__std";
    public static final String UPDTDCNTCVA = "updt_d_cnt__cva";
    public static final String UPDTDCNTCVANEW = "updt_d_cnt__cva_new";
    public static final String UPDTMCNTMAX = "updt_m_cnt__max";
    public static final String UPDTMCNTMIN = "updt_m_cnt__min";
    public static final String UPDTMCNTAVG = "updt_m_cnt__avg";
    public static final String UPDTMCNTNAVG = "updt_m_cnt__nonavg";
    public static final String UPDTMCNT0CNT = "updt_m_cnt__0cnt";
    public static final String UPDTMCNTCTS = "updt_m_cnt__cts";
    public static final String UPDTMCNTSTD = "updt_m_cnt__std";
    public static final String UPDTMCNTCVA = "updt_m_cnt__cva";

    public Integer inst_d_min = null;
    public Integer inst_d_max = null;
    public Double inst_d_medium = null;
    public Integer inst_m_min = null;
    public Integer inst_m_max = null;
    public Double inst_m_medium = null;
    public Integer updt_d_min = null;
    public Integer updt_d_max = null;
    public Double updt_d_medium = null;
    public Integer updt_m_min = null;
    public Integer updt_m_max = null;
    public Double updt_m_medium = null;

    public int inst_d_cnt__max = Integer.MIN_VALUE;
    public int inst_d_cnt__min = Integer.MAX_VALUE;
    public double inst_d_cnt__avg;
    public Double inst_d_cnt__nonavg;
    public int inst_d_cnt__0cnt = 0;
    public int inst_d_cnt__cts = 0;
    public double inst_d_cnt__std;
    public double inst_d_cnt__cva;
    public double inst_d_cnt__cva_new;
    public int inst_m_cnt__max = Integer.MIN_VALUE;
    public int inst_m_cnt__min = Integer.MAX_VALUE;
    public double inst_m_cnt__avg;
    public Double inst_m_cnt__nonavg;
    public int inst_m_cnt__0cnt = 0;
    public int inst_m_cnt__cts = 0;
    public double inst_m_cnt__std;
    public double inst_m_cnt__cva;

    public int updt_d_cnt__max = Integer.MIN_VALUE;
    public int updt_d_cnt__min = Integer.MAX_VALUE;
    public double updt_d_cnt__avg;
    public Double updt_d_cnt__nonavg;
    public int updt_d_cnt__0cnt = 0;
    public int updt_d_cnt__cts = 0;
    public double updt_d_cnt__std;
    public double updt_d_cnt__cva;
    public double updt_d_cnt__cva_new;
    public int updt_m_cnt__max = Integer.MIN_VALUE;
    public int updt_m_cnt__min = Integer.MAX_VALUE;
    public double updt_m_cnt__avg;
    public Double updt_m_cnt__nonavg;
    public int updt_m_cnt__0cnt = 0;
    public int updt_m_cnt__cts = 0;
    public double updt_m_cnt__std;
    public double updt_m_cnt__cva;

    private LinkedList<Integer> inst_d_list = null;
    private LinkedList<Integer> inst_m_list = null;
    private LinkedList<Integer> updt_d_list = null;
    private LinkedList<Integer> updt_m_list = null;
    private HashMap<String, HashSet<String>> basicMap = null;

    public HashMap<String, Object> getSingleMap() {
        return singleMap;
    }

    private HashMap<String, Object> singleMap = null;

    private String cate = null;

    public AppCategoryBasicInfo(String cate) {
        this.cate = cate;
        singleMap = new HashMap<>();
        basicMap = new HashMap<>();
        basicMap.put(ALLSET, new HashSet<>());
        basicMap.put(INSTH1_6, new HashSet<>());
        basicMap.put(INSTH7_12, new HashSet<>());
        basicMap.put(INSTH13_18, new HashSet<>());
        basicMap.put(INSTH19_24, new HashSet<>());
        basicMap.put(UPDTH1_6, new HashSet<>());
        basicMap.put(UPDTH7_12, new HashSet<>());
        basicMap.put(UPDTH13_18, new HashSet<>());
        basicMap.put(UPDTH19_24, new HashSet<>());

        basicMap.put(INSTDCNT0TH, new HashSet<>());
        basicMap.put(INSTDCNT1TH, new HashSet<>());
        basicMap.put(INSTDCNT2TH, new HashSet<>());
        basicMap.put(INSTDCNT3TH, new HashSet<>());
        basicMap.put(INSTDCNT4TH, new HashSet<>());
        basicMap.put(INSTDCNT5TH, new HashSet<>());
        basicMap.put(INSTDCNT6TH, new HashSet<>());
        basicMap.put(INSTDCNT7TH, new HashSet<>());
        basicMap.put(INSTDCNT3, new HashSet<>());
        basicMap.put(INSTDCNT5, new HashSet<>());
        basicMap.put(INSTDCNT7, new HashSet<>());
        basicMap.put(INSTDCNT10, new HashSet<>());
        basicMap.put(INSTDCNT15, new HashSet<>());
        basicMap.put(INSTMCNT1TH, new HashSet<>());
        basicMap.put(INSTMCNT2TH, new HashSet<>());
        basicMap.put(INSTMCNT3TH, new HashSet<>());
        basicMap.put(INSTMCNT4TH, new HashSet<>());
        basicMap.put(INSTMCNT5TH, new HashSet<>());
        basicMap.put(INSTMCNT6TH, new HashSet<>());
        basicMap.put(INSTMCNT3, new HashSet<>());
        basicMap.put(INSTMCNT6, new HashSet<>());
        basicMap.put(INSTMCNT9, new HashSet<>());
        basicMap.put(INSTMCNT12, new HashSet<>());
        basicMap.put(INSTMCNT24, new HashSet<>());

        basicMap.put(UPDTDCNT0TH, new HashSet<>());
        basicMap.put(UPDTDCNT1TH, new HashSet<>());
        basicMap.put(UPDTDCNT2TH, new HashSet<>());
        basicMap.put(UPDTDCNT3TH, new HashSet<>());
        basicMap.put(UPDTDCNT4TH, new HashSet<>());
        basicMap.put(UPDTDCNT5TH, new HashSet<>());
        basicMap.put(UPDTDCNT6TH, new HashSet<>());
        basicMap.put(UPDTDCNT7TH, new HashSet<>());
        basicMap.put(UPDTDCNT3, new HashSet<>());
        basicMap.put(UPDTDCNT5, new HashSet<>());
        basicMap.put(UPDTDCNT7, new HashSet<>());
        basicMap.put(UPDTDCNT10, new HashSet<>());
        basicMap.put(UPDTDCNT15, new HashSet<>());
        basicMap.put(UPDTMCNT1TH, new HashSet<>());
        basicMap.put(UPDTMCNT2TH, new HashSet<>());
        basicMap.put(UPDTMCNT3TH, new HashSet<>());
        basicMap.put(UPDTMCNT4TH, new HashSet<>());
        basicMap.put(UPDTMCNT5TH, new HashSet<>());
        basicMap.put(UPDTMCNT6TH, new HashSet<>());
        basicMap.put(UPDTMCNT3, new HashSet<>());
        basicMap.put(UPDTMCNT6, new HashSet<>());
        basicMap.put(UPDTMCNT9, new HashSet<>());
        basicMap.put(UPDTMCNT12, new HashSet<>());
        basicMap.put(UPDTMCNT24, new HashSet<>());
        /** 是否在好分期之后 */
        if (cate.equals(TAGBANK) || cate.equals(TAGLOAN)) {
            basicMap.put(ISAFTHFQINST, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT0TH, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT1TH, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT2TH, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT3TH, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT4TH, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT5TH, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT6TH, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT7TH, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT3, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT5, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT7, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT10, new HashSet<>());
            basicMap.put(AFTHFQINSTDCNT15, new HashSet<>());
            basicMap.put(AFTHFQINSTMCNT1TH, new HashSet<>());
            basicMap.put(AFTHFQINSTMCNT2TH, new HashSet<>());
            basicMap.put(AFTHFQINSTMCNT3TH, new HashSet<>());
            basicMap.put(AFTHFQINSTMCNT4TH, new HashSet<>());
            basicMap.put(AFTHFQINSTMCNT5TH, new HashSet<>());
            basicMap.put(AFTHFQINSTMCNT6TH, new HashSet<>());

            basicMap.put(AFTHFQINSTDDCNT2TH, new HashSet<>());
            basicMap.put(AFTHFQINSTMMCNT2TH, new HashSet<>());
            basicMap.put(AFTHFQINSTMMCNT6TH, new HashSet<>());

            basicMap.put(AFTHFQUPDTDCNT0TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT1TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT2TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT3TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT4TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT5TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT6TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT7TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT3, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT5, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT7, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT10, new HashSet<>());
            basicMap.put(AFTHFQUPDTDCNT15, new HashSet<>());
            basicMap.put(AFTHFQUPDTMCNT1TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTMCNT2TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTMCNT3TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTMCNT4TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTMCNT5TH, new HashSet<>());
            basicMap.put(AFTHFQUPDTMCNT6TH, new HashSet<>());

            basicMap.put(ISBFHFQINST, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT0TH, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT1TH, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT2TH, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT3TH, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT4TH, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT5TH, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT6TH, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT7TH, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT3, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT5, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT7, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT10, new HashSet<>());
            basicMap.put(BFHFQINSTDCNT15, new HashSet<>());
            basicMap.put(BFHFQINSTMCNT1TH, new HashSet<>());
            basicMap.put(BFHFQINSTMCNT2TH, new HashSet<>());
            basicMap.put(BFHFQINSTMCNT3TH, new HashSet<>());
            basicMap.put(BFHFQINSTMCNT4TH, new HashSet<>());
            basicMap.put(BFHFQINSTMCNT5TH, new HashSet<>());
            basicMap.put(BFHFQINSTMCNT6TH, new HashSet<>());

            basicMap.put(BFHFQUPDTDCNT0TH, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT1TH, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT2TH, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT3TH, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT4TH, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT5TH, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT6TH, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT7TH, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT3, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT5, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT7, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT10, new HashSet<>());
            basicMap.put(BFHFQUPDTDCNT15, new HashSet<>());
            basicMap.put(BFHFQUPDTMCNT1TH, new HashSet<>());
            basicMap.put(BFHFQUPDTMCNT2TH, new HashSet<>());
            basicMap.put(BFHFQUPDTMCNT3TH, new HashSet<>());
            basicMap.put(BFHFQUPDTMCNT4TH, new HashSet<>());
            basicMap.put(BFHFQUPDTMCNT5TH, new HashSet<>());
            basicMap.put(BFHFQUPDTMCNT6TH, new HashSet<>());
        }

        inst_d_list = new LinkedList<>();
        inst_m_list = new LinkedList<>();
        updt_d_list = new LinkedList<>();
        updt_m_list = new LinkedList<>();
    }

    private void formatCnt() {
        Set<String> keys = basicMap.keySet();
        String cate = getCate();
        for (String key : keys) {
            if ((cate.equals(TAGBANK) || cate.equals(TAGLOAN)) && key.equals("bf_hfq")) {
                int cateCnt = basicMap.get(ALLSET).size();
                int aft_hfq_cnt = basicMap.get("aft_hfq").size();
                int bf_hfq_cnt = cateCnt - aft_hfq_cnt;
                singleMap.put(key, bf_hfq_cnt);
            } else {
                singleMap.put(key, basicMap.get(key).size());
            }
        }
    }

    private void formatRateTot() {

        int totCnt = basicMap.get(ALLSET).size();

        calculateRteTh(totCnt);

        calculateListLabel();
    }

    private void formatRateCate(HashMap<String, HashSet<String>> totalMap) {

        int totCnt = totalMap.get(ALLSET).size();
        calculateRteTh(totCnt);
        calculateThRte(totalMap);
        if (cate.equals(TAGBANK) || cate.equals(TAGLOAN)) {
            calculateHfqRteTh();
        }
        calculateListLabel();
    }

    //    bank_inst_d_rte_0th = bank_inst_d_cnt_0th/all_bank_apk
    private void calculateRteTh(int totCnt) {
        int cate_size = basicMap.get(ALLSET).size();
        //        String cate = this.cate;
        if (!cate.equals(TAGTOT) && cate_size != 0 && totCnt != 0) {
            singleMap.put("rte", (cate_size / (double) totCnt));
        }

        if (cate_size != 0) {
            singleMap.put(INSTDRTE0TH, (basicMap.get(INSTDCNT0TH).size() / (double) cate_size));
            singleMap.put(INSTDRTE1TH, (basicMap.get(INSTDCNT1TH).size() / (double) cate_size));
            singleMap.put(INSTDRTE2TH, (basicMap.get(INSTDCNT2TH).size() / (double) cate_size));
            singleMap.put(INSTDRTE3TH, (basicMap.get(INSTDCNT3TH).size() / (double) cate_size));
            singleMap.put(INSTDRTE4TH, (basicMap.get(INSTDCNT4TH).size() / (double) cate_size));
            singleMap.put(INSTDRTE5TH, (basicMap.get(INSTDCNT5TH).size() / (double) cate_size));
            singleMap.put(INSTDRTE6TH, (basicMap.get(INSTDCNT6TH).size() / (double) cate_size));
            singleMap.put(INSTDRTE7TH, (basicMap.get(INSTDCNT7TH).size() / (double) cate_size));
            singleMap.put(INSTDRTE3, (basicMap.get(INSTDCNT3).size() / (double) cate_size));
            singleMap.put(INSTDRTE5, (basicMap.get(INSTDCNT5).size() / (double) cate_size));
            singleMap.put(INSTDRTE7, (basicMap.get(INSTDCNT7).size() / (double) cate_size));
            singleMap.put(INSTDRTE10, (basicMap.get(INSTDCNT10).size() / (double) cate_size));
            singleMap.put(INSTDRTE15, (basicMap.get(INSTDCNT15).size() / (double) cate_size));
            singleMap.put(INSTMRTE1TH, (basicMap.get(INSTMCNT1TH).size() / (double) cate_size));
            singleMap.put(INSTMRTE2TH, (basicMap.get(INSTMCNT2TH).size() / (double) cate_size));
            singleMap.put(INSTMRTE3TH, (basicMap.get(INSTMCNT3TH).size() / (double) cate_size));
            singleMap.put(INSTMRTE4TH, (basicMap.get(INSTMCNT4TH).size() / (double) cate_size));
            singleMap.put(INSTMRTE5TH, (basicMap.get(INSTMCNT5TH).size() / (double) cate_size));
            singleMap.put(INSTMRTE6TH, (basicMap.get(INSTMCNT6TH).size() / (double) cate_size));
            singleMap.put(INSTMRTE3, (basicMap.get(INSTMCNT3).size() / (double) cate_size));
            singleMap.put(INSTMRTE6, (basicMap.get(INSTMCNT6).size() / (double) cate_size));
            singleMap.put(INSTMRTE9, (basicMap.get(INSTMCNT9).size() / (double) cate_size));
            singleMap.put(INSTMRTE12, (basicMap.get(INSTMCNT12).size() / (double) cate_size));
            singleMap.put(INSTMRTE24, (basicMap.get(INSTMCNT24).size() / (double) cate_size));
            singleMap.put(UPDTDRTE0TH, (basicMap.get(UPDTDCNT0TH).size() / (double) cate_size));
            singleMap.put(UPDTDRTE1TH, (basicMap.get(UPDTDCNT1TH).size() / (double) cate_size));
            singleMap.put(UPDTDRTE2TH, (basicMap.get(UPDTDCNT2TH).size() / (double) cate_size));
            singleMap.put(UPDTDRTE3TH, (basicMap.get(UPDTDCNT3TH).size() / (double) cate_size));
            singleMap.put(UPDTDRTE4TH, (basicMap.get(UPDTDCNT4TH).size() / (double) cate_size));
            singleMap.put(UPDTDRTE5TH, (basicMap.get(UPDTDCNT5TH).size() / (double) cate_size));
            singleMap.put(UPDTDRTE6TH, (basicMap.get(UPDTDCNT6TH).size() / (double) cate_size));
            singleMap.put(UPDTDRTE7TH, (basicMap.get(UPDTDCNT7TH).size() / (double) cate_size));
            singleMap.put(UPDTDRTE3, (basicMap.get(UPDTDCNT3).size() / (double) cate_size));
            singleMap.put(UPDTDRTE5, (basicMap.get(UPDTDCNT5).size() / (double) cate_size));
            singleMap.put(UPDTDRTE7, (basicMap.get(UPDTDCNT7).size() / (double) cate_size));
            singleMap.put(UPDTDRTE10, (basicMap.get(UPDTDCNT10).size() / (double) cate_size));
            singleMap.put(UPDTDRTE15, (basicMap.get(UPDTDCNT15).size() / (double) cate_size));
            singleMap.put(UPDTMRTE1TH, (basicMap.get(UPDTMCNT1TH).size() / (double) cate_size));
            singleMap.put(UPDTMRTE2TH, (basicMap.get(UPDTMCNT2TH).size() / (double) cate_size));
            singleMap.put(UPDTMRTE3TH, (basicMap.get(UPDTMCNT3TH).size() / (double) cate_size));
            singleMap.put(UPDTMRTE4TH, (basicMap.get(UPDTMCNT4TH).size() / (double) cate_size));
            singleMap.put(UPDTMRTE5TH, (basicMap.get(UPDTMCNT5TH).size() / (double) cate_size));
            singleMap.put(UPDTMRTE6TH, (basicMap.get(UPDTMCNT6TH).size() / (double) cate_size));
            singleMap.put(UPDTMRTE3, (basicMap.get(UPDTMCNT3).size() / (double) cate_size));
            singleMap.put(UPDTMRTE6, (basicMap.get(UPDTMCNT6).size() / (double) cate_size));
            singleMap.put(UPDTMRTE9, (basicMap.get(UPDTMCNT9).size() / (double) cate_size));
            singleMap.put(UPDTMRTE12, (basicMap.get(UPDTMCNT12).size() / (double) cate_size));
            singleMap.put(UPDTMRTE24, (basicMap.get(UPDTMCNT24).size() / (double) cate_size));
        }
    }

    // bank_inst_d_cnt_0th_rte = bank_inst_d_cnt_0th/tot_inst_d_cnt_0th
    private void calculateThRte(HashMap<String, HashSet<String>> totalMap) {
        if (basicMap.get(ALLSET).size() != 0) {
            if (totalMap.get(INSTDCNT0TH).size() != 0) {
                singleMap.put(
                        INSTDCNT0TH + RTEEND,
                        (basicMap.get(INSTDCNT0TH).size()
                                / (double) totalMap.get(INSTDCNT0TH).size()));
            }
            if (totalMap.get(INSTDCNT1TH).size() != 0) {
                singleMap.put(
                        INSTDCNT1TH + RTEEND,
                        (basicMap.get(INSTDCNT1TH).size()
                                / (double) totalMap.get(INSTDCNT1TH).size()));
            }
            if (totalMap.get(INSTDCNT2TH).size() != 0) {
                singleMap.put(
                        INSTDCNT2TH + RTEEND,
                        (basicMap.get(INSTDCNT2TH).size()
                                / (double) totalMap.get(INSTDCNT2TH).size()));
            }
            if (totalMap.get(INSTDCNT3TH).size() != 0) {
                singleMap.put(
                        INSTDCNT3TH + RTEEND,
                        (basicMap.get(INSTDCNT3TH).size()
                                / (double) totalMap.get(INSTDCNT3TH).size()));
            }
            if (totalMap.get(INSTDCNT4TH).size() != 0) {
                singleMap.put(
                        INSTDCNT4TH + RTEEND,
                        (basicMap.get(INSTDCNT4TH).size()
                                / (double) totalMap.get(INSTDCNT4TH).size()));
            }
            if (totalMap.get(INSTDCNT5TH).size() != 0) {
                singleMap.put(
                        INSTDCNT5TH + RTEEND,
                        (basicMap.get(INSTDCNT5TH).size()
                                / (double) totalMap.get(INSTDCNT5TH).size()));
            }
            if (totalMap.get(INSTDCNT6TH).size() != 0) {
                singleMap.put(
                        INSTDCNT6TH + RTEEND,
                        (basicMap.get(INSTDCNT6TH).size()
                                / (double) totalMap.get(INSTDCNT6TH).size()));
            }
            if (totalMap.get(INSTDCNT7TH).size() != 0) {
                singleMap.put(
                        INSTDCNT7TH + RTEEND,
                        (basicMap.get(INSTDCNT7TH).size()
                                / (double) totalMap.get(INSTDCNT7TH).size()));
            }
            if (totalMap.get(INSTDCNT3).size() != 0) {
                singleMap.put(
                        INSTDCNT3 + RTEEND,
                        (basicMap.get(INSTDCNT3).size() / (double) totalMap.get(INSTDCNT3).size()));
            }
            if (totalMap.get(INSTDCNT5).size() != 0) {
                singleMap.put(
                        INSTDCNT5 + RTEEND,
                        (basicMap.get(INSTDCNT5).size() / (double) totalMap.get(INSTDCNT5).size()));
            }
            if (totalMap.get(INSTDCNT7).size() != 0) {
                singleMap.put(
                        INSTDCNT7 + RTEEND,
                        (basicMap.get(INSTDCNT7).size() / (double) totalMap.get(INSTDCNT7).size()));
            }
            if (totalMap.get(INSTDCNT10).size() != 0) {
                singleMap.put(
                        INSTDCNT10 + RTEEND,
                        (basicMap.get(INSTDCNT10).size()
                                / (double) totalMap.get(INSTDCNT10).size()));
            }
            if (totalMap.get(INSTDCNT15).size() != 0) {
                singleMap.put(
                        INSTDCNT15 + RTEEND,
                        (basicMap.get(INSTDCNT15).size()
                                / (double) totalMap.get(INSTDCNT15).size()));
            }
            if (totalMap.get(INSTMCNT1TH).size() != 0) {
                singleMap.put(
                        INSTMCNT1TH + RTEEND,
                        (basicMap.get(INSTMCNT1TH).size()
                                / (double) totalMap.get(INSTMCNT1TH).size()));
            }
            if (totalMap.get(INSTMCNT2TH).size() != 0) {
                singleMap.put(
                        INSTMCNT2TH + RTEEND,
                        (basicMap.get(INSTMCNT2TH).size()
                                / (double) totalMap.get(INSTMCNT2TH).size()));
            }
            if (totalMap.get(INSTMCNT3TH).size() != 0) {
                singleMap.put(
                        INSTMCNT3TH + RTEEND,
                        (basicMap.get(INSTMCNT3TH).size()
                                / (double) totalMap.get(INSTMCNT3TH).size()));
            }
            if (totalMap.get(INSTMCNT4TH).size() != 0) {
                singleMap.put(
                        INSTMCNT4TH + RTEEND,
                        (basicMap.get(INSTMCNT4TH).size()
                                / (double) totalMap.get(INSTMCNT4TH).size()));
            }
            if (totalMap.get(INSTMCNT5TH).size() != 0) {
                singleMap.put(
                        INSTMCNT5TH + RTEEND,
                        (basicMap.get(INSTMCNT5TH).size()
                                / (double) totalMap.get(INSTMCNT5TH).size()));
            }
            if (totalMap.get(INSTMCNT6TH).size() != 0) {
                singleMap.put(
                        INSTMCNT6TH + RTEEND,
                        (basicMap.get(INSTMCNT6TH).size()
                                / (double) totalMap.get(INSTMCNT6TH).size()));
            }
            if (totalMap.get(INSTMCNT3).size() != 0) {
                singleMap.put(
                        INSTMCNT3 + RTEEND,
                        (basicMap.get(INSTMCNT3).size() / (double) totalMap.get(INSTMCNT3).size()));
            }
            if (totalMap.get(INSTMCNT6).size() != 0) {
                singleMap.put(
                        INSTMCNT6 + RTEEND,
                        (basicMap.get(INSTMCNT6).size() / (double) totalMap.get(INSTMCNT6).size()));
            }
            if (totalMap.get(INSTMCNT9).size() != 0) {
                singleMap.put(
                        INSTMCNT9 + RTEEND,
                        (basicMap.get(INSTMCNT9).size() / (double) totalMap.get(INSTMCNT9).size()));
            }
            if (totalMap.get(INSTMCNT12).size() != 0) {
                singleMap.put(
                        INSTMCNT12 + RTEEND,
                        (basicMap.get(INSTMCNT12).size()
                                / (double) totalMap.get(INSTMCNT12).size()));
            }
            if (totalMap.get(INSTMCNT24).size() != 0) {
                singleMap.put(
                        INSTMCNT24 + RTEEND,
                        (basicMap.get(INSTMCNT24).size()
                                / (double) totalMap.get(INSTMCNT24).size()));
            }
            if (totalMap.get(UPDTDCNT0TH).size() != 0) {
                singleMap.put(
                        UPDTDCNT0TH + RTEEND,
                        (basicMap.get(UPDTDCNT0TH).size()
                                / (double) totalMap.get(UPDTDCNT0TH).size()));
            }
            if (totalMap.get(UPDTDCNT1TH).size() != 0) {
                singleMap.put(
                        UPDTDCNT1TH + RTEEND,
                        (basicMap.get(UPDTDCNT1TH).size()
                                / (double) totalMap.get(UPDTDCNT1TH).size()));
            }
            if (totalMap.get(UPDTDCNT2TH).size() != 0) {
                singleMap.put(
                        UPDTDCNT2TH + RTEEND,
                        (basicMap.get(UPDTDCNT2TH).size()
                                / (double) totalMap.get(UPDTDCNT2TH).size()));
            }
            if (totalMap.get(UPDTDCNT3TH).size() != 0) {
                singleMap.put(
                        UPDTDCNT3TH + RTEEND,
                        (basicMap.get(UPDTDCNT3TH).size()
                                / (double) totalMap.get(UPDTDCNT3TH).size()));
            }
            if (totalMap.get(UPDTDCNT4TH).size() != 0) {
                singleMap.put(
                        UPDTDCNT4TH + RTEEND,
                        (basicMap.get(UPDTDCNT4TH).size()
                                / (double) totalMap.get(UPDTDCNT4TH).size()));
            }
            if (totalMap.get(UPDTDCNT5TH).size() != 0) {
                singleMap.put(
                        UPDTDCNT5TH + RTEEND,
                        (basicMap.get(UPDTDCNT5TH).size()
                                / (double) totalMap.get(UPDTDCNT5TH).size()));
            }
            if (totalMap.get(UPDTDCNT6TH).size() != 0) {
                singleMap.put(
                        UPDTDCNT6TH + RTEEND,
                        (basicMap.get(UPDTDCNT6TH).size()
                                / (double) totalMap.get(UPDTDCNT6TH).size()));
            }
            if (totalMap.get(UPDTDCNT7TH).size() != 0) {
                singleMap.put(
                        UPDTDCNT7TH + RTEEND,
                        (basicMap.get(UPDTDCNT7TH).size()
                                / (double) totalMap.get(UPDTDCNT7TH).size()));
            }
            if (totalMap.get(UPDTDCNT3).size() != 0) {
                singleMap.put(
                        UPDTDCNT3 + RTEEND,
                        (basicMap.get(UPDTDCNT3).size() / (double) totalMap.get(UPDTDCNT3).size()));
            }
            if (totalMap.get(UPDTDCNT5).size() != 0) {
                singleMap.put(
                        UPDTDCNT5 + RTEEND,
                        (basicMap.get(UPDTDCNT5).size() / (double) totalMap.get(UPDTDCNT5).size()));
            }
            if (totalMap.get(UPDTDCNT7).size() != 0) {
                singleMap.put(
                        UPDTDCNT7 + RTEEND,
                        (basicMap.get(UPDTDCNT7).size() / (double) totalMap.get(UPDTDCNT7).size()));
            }
            if (totalMap.get(UPDTDCNT10).size() != 0) {
                singleMap.put(
                        UPDTDCNT10 + RTEEND,
                        (basicMap.get(UPDTDCNT10).size()
                                / (double) totalMap.get(UPDTDCNT10).size()));
            }
            if (totalMap.get(UPDTDCNT15).size() != 0) {
                singleMap.put(
                        UPDTDCNT15 + RTEEND,
                        (basicMap.get(UPDTDCNT15).size()
                                / (double) totalMap.get(UPDTDCNT15).size()));
            }
            if (totalMap.get(UPDTMCNT1TH).size() != 0) {
                singleMap.put(
                        UPDTMCNT1TH + RTEEND,
                        (basicMap.get(UPDTMCNT1TH).size()
                                / (double) totalMap.get(UPDTMCNT1TH).size()));
            }
            if (totalMap.get(UPDTMCNT2TH).size() != 0) {
                singleMap.put(
                        UPDTMCNT2TH + RTEEND,
                        (basicMap.get(UPDTMCNT2TH).size()
                                / (double) totalMap.get(UPDTMCNT2TH).size()));
            }
            if (totalMap.get(UPDTMCNT3TH).size() != 0) {
                singleMap.put(
                        UPDTMCNT3TH + RTEEND,
                        (basicMap.get(UPDTMCNT3TH).size()
                                / (double) totalMap.get(UPDTMCNT3TH).size()));
            }
            if (totalMap.get(UPDTMCNT4TH).size() != 0) {
                singleMap.put(
                        UPDTMCNT4TH + RTEEND,
                        (basicMap.get(UPDTMCNT4TH).size()
                                / (double) totalMap.get(UPDTMCNT4TH).size()));
            }
            if (totalMap.get(UPDTMCNT5TH).size() != 0) {
                singleMap.put(
                        UPDTMCNT5TH + RTEEND,
                        (basicMap.get(UPDTMCNT5TH).size()
                                / (double) totalMap.get(UPDTMCNT5TH).size()));
            }
            if (totalMap.get(UPDTMCNT6TH).size() != 0) {
                singleMap.put(
                        UPDTMCNT6TH + RTEEND,
                        (basicMap.get(UPDTMCNT6TH).size()
                                / (double) totalMap.get(UPDTMCNT6TH).size()));
            }
            if (totalMap.get(UPDTMCNT3).size() != 0) {
                singleMap.put(
                        UPDTMCNT3 + RTEEND,
                        (basicMap.get(UPDTMCNT3).size() / (double) totalMap.get(UPDTMCNT3).size()));
            }
            if (totalMap.get(UPDTMCNT6).size() != 0) {
                singleMap.put(
                        UPDTMCNT6 + RTEEND,
                        (basicMap.get(UPDTMCNT6).size() / (double) totalMap.get(UPDTMCNT6).size()));
            }
            if (totalMap.get(UPDTMCNT9).size() != 0) {
                singleMap.put(
                        UPDTMCNT9 + RTEEND,
                        (basicMap.get(UPDTMCNT9).size() / (double) totalMap.get(UPDTMCNT9).size()));
            }
            if (totalMap.get(UPDTMCNT12).size() != 0) {
                singleMap.put(
                        UPDTMCNT12 + RTEEND,
                        (basicMap.get(UPDTMCNT12).size()
                                / (double) totalMap.get(UPDTMCNT12).size()));
            }
            if (totalMap.get(UPDTMCNT24).size() != 0) {
                singleMap.put(
                        UPDTMCNT24 + RTEEND,
                        (basicMap.get(UPDTMCNT24).size()
                                / (double) totalMap.get(UPDTMCNT24).size()));
            }
        }
    }

    // bank_is_aft_hfq_inst_d_rte_0th = is_aft_hfq_inst_d_cnt_0th / bank_aft_hfq_cnt;
    private void calculateHfqRteTh() {
        int aft_hfq_cnt = basicMap.get(ISAFTHFQINST).size();
        int bf_hfq_cnt = basicMap.get(ISBFHFQINST).size();

        if (basicMap.get(ALLSET).size() != 0
                && (getCate().equals(TAGBANK) || getCate().equals(TAGLOAN))) {
            if (aft_hfq_cnt != 0) {
                singleMap.put(
                        AFTHFQINSTDRTE0TH,
                        (basicMap.get(AFTHFQINSTDCNT0TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE1TH,
                        (basicMap.get(AFTHFQINSTDCNT1TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE2TH,
                        (basicMap.get(AFTHFQINSTDCNT2TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE3TH,
                        (basicMap.get(AFTHFQINSTDCNT3TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE4TH,
                        (basicMap.get(AFTHFQINSTDCNT4TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE5TH,
                        (basicMap.get(AFTHFQINSTDCNT5TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE6TH,
                        (basicMap.get(AFTHFQINSTDCNT6TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE7TH,
                        (basicMap.get(AFTHFQINSTDCNT7TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE3,
                        (basicMap.get(AFTHFQINSTDCNT3).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE5,
                        (basicMap.get(AFTHFQINSTDCNT5).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE7,
                        (basicMap.get(AFTHFQINSTDCNT7).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE10,
                        (basicMap.get(AFTHFQINSTDCNT10).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTDRTE15,
                        (basicMap.get(AFTHFQINSTDCNT15).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTMRTE1TH,
                        (basicMap.get(AFTHFQINSTMCNT1TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTMRTE2TH,
                        (basicMap.get(AFTHFQINSTMCNT2TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTMRTE3TH,
                        (basicMap.get(AFTHFQINSTMCNT3TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTMRTE4TH,
                        (basicMap.get(AFTHFQINSTMCNT4TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTMRTE5TH,
                        (basicMap.get(AFTHFQINSTMCNT5TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQINSTMRTE6TH,
                        (basicMap.get(AFTHFQINSTMCNT6TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE0TH,
                        (basicMap.get(AFTHFQUPDTDCNT0TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE1TH,
                        (basicMap.get(AFTHFQUPDTDCNT1TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE2TH,
                        (basicMap.get(AFTHFQUPDTDCNT2TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE3TH,
                        (basicMap.get(AFTHFQUPDTDCNT3TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE4TH,
                        (basicMap.get(AFTHFQUPDTDCNT4TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE5TH,
                        (basicMap.get(AFTHFQUPDTDCNT5TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE6TH,
                        (basicMap.get(AFTHFQUPDTDCNT6TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE7TH,
                        (basicMap.get(AFTHFQUPDTDCNT7TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE3,
                        (basicMap.get(AFTHFQUPDTDCNT3).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE5,
                        (basicMap.get(AFTHFQUPDTDCNT5).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE7,
                        (basicMap.get(AFTHFQUPDTDCNT7).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE10,
                        (basicMap.get(AFTHFQUPDTDCNT10).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTDRTE15,
                        (basicMap.get(AFTHFQUPDTDCNT15).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTMRTE1TH,
                        (basicMap.get(AFTHFQUPDTMCNT1TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTMRTE2TH,
                        (basicMap.get(AFTHFQUPDTMCNT2TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTMRTE3TH,
                        (basicMap.get(AFTHFQUPDTMCNT3TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTMRTE4TH,
                        (basicMap.get(AFTHFQUPDTMCNT4TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTMRTE5TH,
                        (basicMap.get(AFTHFQUPDTMCNT5TH).size() / (double) aft_hfq_cnt));
                singleMap.put(
                        AFTHFQUPDTMRTE6TH,
                        (basicMap.get(AFTHFQUPDTMCNT6TH).size() / (double) aft_hfq_cnt));
            }

            if (bf_hfq_cnt != 0) {
                singleMap.put(
                        BFHFQINSTDRTE0TH,
                        (basicMap.get(BFHFQINSTDCNT0TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE1TH,
                        (basicMap.get(BFHFQINSTDCNT1TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE2TH,
                        (basicMap.get(BFHFQINSTDCNT2TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE3TH,
                        (basicMap.get(BFHFQINSTDCNT3TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE4TH,
                        (basicMap.get(BFHFQINSTDCNT4TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE5TH,
                        (basicMap.get(BFHFQINSTDCNT5TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE6TH,
                        (basicMap.get(BFHFQINSTDCNT6TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE7TH,
                        (basicMap.get(BFHFQINSTDCNT7TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE3,
                        (basicMap.get(BFHFQINSTDCNT3).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE5,
                        (basicMap.get(BFHFQINSTDCNT5).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE7,
                        (basicMap.get(BFHFQINSTDCNT7).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE10,
                        (basicMap.get(BFHFQINSTDCNT10).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTDRTE15,
                        (basicMap.get(BFHFQINSTDCNT15).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTMRTE1TH,
                        (basicMap.get(BFHFQINSTMCNT1TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTMRTE2TH,
                        (basicMap.get(BFHFQINSTMCNT2TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTMRTE3TH,
                        (basicMap.get(BFHFQINSTMCNT3TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTMRTE4TH,
                        (basicMap.get(BFHFQINSTMCNT4TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTMRTE5TH,
                        (basicMap.get(BFHFQINSTMCNT5TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQINSTMRTE6TH,
                        (basicMap.get(BFHFQINSTMCNT6TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE0TH,
                        (basicMap.get(BFHFQUPDTDCNT0TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE1TH,
                        (basicMap.get(BFHFQUPDTDCNT1TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE2TH,
                        (basicMap.get(BFHFQUPDTDCNT2TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE3TH,
                        (basicMap.get(BFHFQUPDTDCNT3TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE4TH,
                        (basicMap.get(BFHFQUPDTDCNT4TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE5TH,
                        (basicMap.get(BFHFQUPDTDCNT5TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE6TH,
                        (basicMap.get(BFHFQUPDTDCNT6TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE7TH,
                        (basicMap.get(BFHFQUPDTDCNT7TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE3,
                        (basicMap.get(BFHFQUPDTDCNT3).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE5,
                        (basicMap.get(BFHFQUPDTDCNT5).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE7,
                        (basicMap.get(BFHFQUPDTDCNT7).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE10,
                        (basicMap.get(BFHFQUPDTDCNT10).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTDRTE15,
                        (basicMap.get(BFHFQUPDTDCNT15).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTMRTE1TH,
                        (basicMap.get(BFHFQUPDTMCNT1TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTMRTE2TH,
                        (basicMap.get(BFHFQUPDTMCNT2TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTMRTE3TH,
                        (basicMap.get(BFHFQUPDTMCNT3TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTMRTE4TH,
                        (basicMap.get(BFHFQUPDTMCNT4TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTMRTE5TH,
                        (basicMap.get(BFHFQUPDTMCNT5TH).size() / (double) bf_hfq_cnt));
                singleMap.put(
                        BFHFQUPDTMRTE6TH,
                        (basicMap.get(BFHFQUPDTMCNT6TH).size() / (double) bf_hfq_cnt));
            }
        }
    }

    private void calculateListLabel() {
        singleMap.put(INSTDMIN, inst_d_min);
        singleMap.put(INSTDMAX, inst_d_max);
        singleMap.put(INSTDMED, inst_d_medium);
        singleMap.put(INSTMMIN, inst_m_min);
        singleMap.put(INSTMMAX, inst_m_max);
        singleMap.put(INSTMMED, inst_m_medium);

        singleMap.put(INSTDCNTMAX, inst_d_cnt__max);
        singleMap.put(INSTDCNTMIN, inst_d_cnt__min);
        singleMap.put(INSTDCNTAVG, inst_d_cnt__avg);
        singleMap.put(INSTDCNTNAVG, inst_d_cnt__nonavg);
        singleMap.put(INSTDCNT0CNT, inst_d_cnt__0cnt);
        singleMap.put(INSTDCNTCTS, inst_d_cnt__cts);
        singleMap.put(INSTDCNTSTD, inst_d_cnt__std);
        singleMap.put(INSTDCNTCVA, inst_d_cnt__cva);
        singleMap.put(INSTDCNTCVANEW, inst_d_cnt__cva_new);
        singleMap.put(INSTMCNTMAX, inst_m_cnt__max);
        singleMap.put(INSTMCNTMIN, inst_m_cnt__min);
        singleMap.put(INSTMCNTAVG, inst_m_cnt__avg);
        singleMap.put(INSTMCNTNAVG, inst_m_cnt__nonavg);
        singleMap.put(INSTMCNT0CNT, inst_m_cnt__0cnt);
        singleMap.put(INSTMCNTCTS, inst_m_cnt__cts);
        singleMap.put(INSTMCNTSTD, inst_m_cnt__std);
        singleMap.put(INSTMCNTCVA, inst_m_cnt__cva);

        singleMap.put(UPDTDMIN, updt_d_min);
        singleMap.put(UPDTDMAX, updt_d_max);
        singleMap.put(UPDTDMED, updt_d_medium);
        singleMap.put(UPDTMMIN, updt_m_min);
        singleMap.put(UPDTMMAX, updt_m_max);
        singleMap.put(UPDTMMED, updt_m_medium);

        singleMap.put(UPDTDCNTMAX, updt_d_cnt__max);
        singleMap.put(UPDTDCNTMIN, updt_d_cnt__min);
        singleMap.put(UPDTDCNTAVG, updt_d_cnt__avg);
        singleMap.put(UPDTDCNTNAVG, updt_d_cnt__nonavg);
        singleMap.put(UPDTDCNT0CNT, updt_d_cnt__0cnt);
        singleMap.put(UPDTDCNTCTS, updt_d_cnt__cts);
        singleMap.put(UPDTDCNTSTD, updt_d_cnt__std);
        singleMap.put(UPDTDCNTCVA, updt_d_cnt__cva);
        singleMap.put(UPDTDCNTCVANEW, updt_d_cnt__cva_new);
        singleMap.put(UPDTMCNTMAX, updt_m_cnt__max);
        singleMap.put(UPDTMCNTMIN, updt_m_cnt__min);
        singleMap.put(UPDTMCNTAVG, updt_m_cnt__avg);
        singleMap.put(UPDTMCNTNAVG, updt_m_cnt__nonavg);
        singleMap.put(UPDTMCNT0CNT, updt_m_cnt__0cnt);
        singleMap.put(UPDTMCNTCTS, updt_m_cnt__cts);
        singleMap.put(UPDTMCNTSTD, updt_m_cnt__std);
        singleMap.put(UPDTMCNTCVA, updt_m_cnt__cva);
    }

    public String getCate() {
        return cate;
    }

    public HashMap<String, HashSet<String>> getBasicMap() {
        return basicMap;
    }

    public void addInstDay(Integer day) {
        if (day != null) {
            inst_d_list.add(day);
        }
    }

    public void addInstMth(Integer month) {
        if (month != null) {
            inst_m_list.add(month);
        }
    }

    public void addUpdtDay(Integer day) {
        if (day != null) {
            updt_d_list.add(day);
        }
    }

    public void addUpdtMth(Integer month) {
        if (month != null) {
            updt_m_list.add(month);
        }
    }

    public void addKeySet(String key, String appApkName) {
        HashSet<String> reSet = basicMap.get(key);
        if (reSet != null) {
            reSet.add(appApkName);
        } else {
            LOG.debug("addKeySet error key: " + key + " appApkName: " + appApkName);
        }
    }

    private Double calcuStd(int[] array, double avg) {
        int len = array.length;
        double res = 0;
        for (int i = 0; i < len; i++) {
            res += Math.pow((array[i] - avg), 2);
        }
        return res / (double) len;
    }
    // 正确算法
    private Double calcuCvaM(int[] array, double avg) {
        int len = array.length;
        double res = 0;
        for (int i = 0; i < len; i++) {
            res += Math.pow((array[i] - avg), 2);
        }
        res = res / (double) len;
        res = res / (avg + 1e-10);
        return res;
    }

    // 模型算法有误，将错就错
    private Double calcuCvaD(int[] array, double avg) {
        int len = array.length;
        double res = 0;
        for (int i = 1; i < len; i++) {
            res += Math.pow((array[i] - avg), 2);
        }

        res = res / (double) len + Math.pow((array[0] - avg), 2);
        res = res / (avg + 1e-10);
        return res;
    }

    private void calcuLastInst7DayLabel() {
        int[] cntArray = new int[8];
        int sum = 0;
        StringBuilder stb = new StringBuilder();
        for (int i = 0; i < cntArray.length; i++) {
            String key = "inst_d_cnt_" + i + "th";
            cntArray[i] = basicMap.get(key).size();
            if (cntArray[i] != 0) {
                stb.append("1");
            } else {
                // 无安装记录的天数
                inst_d_cnt__0cnt += 1;
                stb.append("0");
            }
            inst_d_cnt__max = (inst_d_cnt__max > cntArray[i] ? inst_d_cnt__max : cntArray[i]);
            inst_d_cnt__min = (inst_d_cnt__min < cntArray[i] ? inst_d_cnt__min : cntArray[i]);
            sum += cntArray[i];
        }
        String recordStr = stb.toString();
        String[] splits = recordStr.split("0");
        for (String split : splits) {
            int len = split.length();
            // 连续非0天数
            inst_d_cnt__cts = (len > inst_d_cnt__cts ? len : inst_d_cnt__cts);
        }

        inst_d_cnt__avg = sum / (double) cntArray.length;
        // 非0天数的均值
        int non0Days = cntArray.length - inst_d_cnt__0cnt;
        if (non0Days == 0) {
            inst_d_cnt__nonavg = null;
        } else {
            inst_d_cnt__nonavg = (sum / (double) non0Days);
        }
        // 方差和变异因子
        inst_d_cnt__std = calcuStd(cntArray, inst_d_cnt__avg);
        inst_d_cnt__cva = calcuCvaD(cntArray, inst_d_cnt__avg);
        inst_d_cnt__cva_new = calcuCvaM(cntArray, inst_d_cnt__avg);
    }
    /*
    统计连续非0天数计算口径有误，调整适配模型错误算法
    模型算法为计算第一个出现0位的月份-1
     */
    private void calcuLastInst6MonLabelErr() {
        int[] cntArray = new int[6];
        int sum = 0;
        int first0pos = 0;
        boolean flag = false;
        for (int i = 0; i < cntArray.length; i++) {
            String key = "inst_m_cnt_" + (i + 1) + "th";
            cntArray[i] = basicMap.get(key).size();
            if (cntArray[i] == 0) {
                // 无安装记录的天数
                inst_m_cnt__0cnt += 1;
                // 记录第一个0的下标
                if (!flag) {
                    first0pos = i + 1;
                    flag = true;
                }
            }
            inst_m_cnt__max = (inst_m_cnt__max > cntArray[i] ? inst_m_cnt__max : cntArray[i]);
            inst_m_cnt__min = (inst_m_cnt__min < cntArray[i] ? inst_m_cnt__min : cntArray[i]);
            sum += cntArray[i];
        }
        inst_m_cnt__cts = first0pos - 1;

        inst_m_cnt__avg = sum / (double) cntArray.length;
        // 非0天数的均值
        int non0Days = cntArray.length - inst_m_cnt__0cnt;
        //        int non0Days = tmp_updt_no0_cnt;
        if (non0Days == 0) {
            inst_m_cnt__nonavg = null;
        } else {
            inst_m_cnt__nonavg = sum / (double) non0Days;
        }
        // 方差
        inst_m_cnt__std = calcuStd(cntArray, inst_m_cnt__avg);
        // 变异因子
        inst_m_cnt__cva = calcuCvaM(cntArray, inst_m_cnt__avg);
    }

    private void calcuLastInst6MonLabel() {
        int[] cntArray = new int[6];
        int sum = 0;
        //        int tmp_updt_no0_cnt = 0;
        StringBuilder stb = new StringBuilder();
        for (int i = 0; i < cntArray.length; i++) {
            String key = "inst_m_cnt_" + (i + 1) + "th";
            cntArray[i] = basicMap.get(key).size();
            if (cntArray[i] != 0) {
                stb.append("1");
                //                tmp_updt_no0_cnt += String.valueOf(cntArray[i]).length();
            } else {
                // 无安装记录的天数
                inst_m_cnt__0cnt += 1;
                stb.append("0");
            }
            inst_m_cnt__max = (inst_m_cnt__max > cntArray[i] ? inst_m_cnt__max : cntArray[i]);
            inst_m_cnt__min = (inst_m_cnt__min < cntArray[i] ? inst_m_cnt__min : cntArray[i]);
            sum += cntArray[i];
        }
        String recordStr = stb.toString();
        String[] splits = recordStr.split("0");
        for (String split : splits) {
            int len = split.length();
            // 连续非0天数
            inst_m_cnt__cts = (len > inst_m_cnt__cts ? len : inst_m_cnt__cts);
        }

        inst_m_cnt__avg = sum / (double) cntArray.length;
        // 非0天数的均值
        int non0Days = cntArray.length - inst_m_cnt__0cnt;
        //        int non0Days = tmp_updt_no0_cnt;
        if (non0Days == 0) {
            inst_m_cnt__nonavg = null;
        } else {
            inst_m_cnt__nonavg = sum / (double) non0Days;
        }
        // 方差
        inst_m_cnt__std = calcuStd(cntArray, inst_m_cnt__avg);
        // 变异因子
        inst_m_cnt__cva = calcuCvaM(cntArray, inst_m_cnt__avg);
    }

    private void calcuLastUpdt7DayLabel() {
        int[] cntArray = new int[8];
        int sum = 0;
        StringBuilder stb = new StringBuilder();
        for (int i = 0; i < cntArray.length; i++) {
            String key = "updt_d_cnt_" + i + "th";
            cntArray[i] = basicMap.get(key).size();
            if (cntArray[i] != 0) {
                stb.append("1");
            } else {
                // 无安装记录的天数
                updt_d_cnt__0cnt += 1;
                stb.append("0");
            }
            updt_d_cnt__max = (updt_d_cnt__max > cntArray[i] ? updt_d_cnt__max : cntArray[i]);
            updt_d_cnt__min = (updt_d_cnt__min < cntArray[i] ? updt_d_cnt__min : cntArray[i]);
            sum += cntArray[i];
        }
        String recordStr = stb.toString();
        String[] splits = recordStr.split("0");
        for (String split : splits) {
            int len = split.length();
            updt_d_cnt__cts = (len > updt_d_cnt__cts ? len : updt_d_cnt__cts);
        }

        updt_d_cnt__avg = sum / (double) cntArray.length;
        /** 非0天数的均值 */
        int non0Days = cntArray.length - updt_d_cnt__0cnt;
        if (non0Days == 0) {
            updt_d_cnt__nonavg = null;
        } else {
            updt_d_cnt__nonavg = sum / (double) non0Days;
        }
        // 方差和变异因子
        updt_d_cnt__std = calcuStd(cntArray, updt_d_cnt__avg);
        updt_d_cnt__cva = calcuCvaD(cntArray, updt_d_cnt__avg);
        updt_d_cnt__cva_new = calcuCvaM(cntArray, updt_d_cnt__avg);
    }

    private void calcuLastUpdt6MonLabelErr() {
        int[] cntArray = new int[6];
        int sum = 0;
        int first0pos = 0;
        boolean flag = false;
        for (int i = 0; i < cntArray.length; i++) {
            String key = "updt_m_cnt_" + (i + 1) + "th";
            cntArray[i] = basicMap.get(key).size();
            if (cntArray[i] == 0) {
                // 无安装记录的天数
                updt_m_cnt__0cnt += 1;
                if (!flag) {
                    first0pos = i + 1;
                    flag = true;
                }
            }
            updt_m_cnt__max = (updt_m_cnt__max > cntArray[i] ? updt_m_cnt__max : cntArray[i]);
            updt_m_cnt__min = (updt_m_cnt__min < cntArray[i] ? updt_m_cnt__min : cntArray[i]);
            sum += cntArray[i];
        }

        updt_m_cnt__cts = first0pos - 1;

        updt_m_cnt__avg = sum / (double) cntArray.length;
        // 非0天数的均值
        int non0Days = cntArray.length - updt_m_cnt__0cnt;
        //        int non0Days = tmp_updt_no0_cnt;
        if (non0Days == 0) {
            updt_m_cnt__nonavg = null;
        } else {
            updt_m_cnt__nonavg = sum / (double) non0Days;
        }
        // 方差和变异因子
        updt_m_cnt__std = calcuStd(cntArray, updt_m_cnt__avg);
        updt_m_cnt__cva = calcuCvaM(cntArray, updt_m_cnt__avg);
    }

    private void calcuLastUpdt6MonLabel() {
        int[] cntArray = new int[6];
        int sum = 0;
        //        int tmp_updt_no0_cnt = 0;
        StringBuilder stb = new StringBuilder();
        for (int i = 0; i < cntArray.length; i++) {
            String key = "updt_m_cnt_" + (i + 1) + "th";
            cntArray[i] = basicMap.get(key).size();
            if (cntArray[i] != 0) {
                stb.append("1");
                //                tmp_updt_no0_cnt += String.valueOf(cntArray[i]).length();
            } else {
                // 无安装记录的天数
                updt_m_cnt__0cnt += 1;
                stb.append("0");
            }
            updt_m_cnt__max = (updt_m_cnt__max > cntArray[i] ? updt_m_cnt__max : cntArray[i]);
            updt_m_cnt__min = (updt_m_cnt__min < cntArray[i] ? updt_m_cnt__min : cntArray[i]);
            sum += cntArray[i];
        }
        String recordStr = stb.toString();
        String[] splits = recordStr.split("0");
        for (String split : splits) {
            int len = split.length();
            // 连续非0天数
            updt_m_cnt__cts = (len > updt_m_cnt__cts ? len : updt_m_cnt__cts);
        }

        updt_m_cnt__avg = sum / (double) cntArray.length;
        // 非0天数的均值
        int non0Days = cntArray.length - updt_m_cnt__0cnt;
        //        int non0Days = tmp_updt_no0_cnt;
        if (non0Days == 0) {
            updt_m_cnt__nonavg = null;
        } else {
            updt_m_cnt__nonavg = sum / (double) non0Days;
        }
        // 方差和变异因子
        updt_m_cnt__std = calcuStd(cntArray, updt_m_cnt__avg);
        updt_m_cnt__cva = calcuCvaM(cntArray, updt_m_cnt__avg);
    }

    private String getDiffDay(Integer day) {
        if (day >= 0 && day <= 7) {
            return "d_cnt_" + day + "th";
        }
        return null;
    }

    //    private String transforDiffDayRange(Integer day) {
    //        if(day <= 3) {
    //            return "d_cnt_3";
    //        } else if(day <= 5){
    //            return "d_cnt_5";
    //        } else if(day <= 7){
    //            return "d_cnt_7";
    //        } else if(day <= 10){
    //            return "d_cnt_10";
    //        } else if(day <= 15){
    //            return "d_cnt_15";
    //        }
    //        return null;
    //    }

    private void addDayRangeSet(String appApkName, Integer day, String prefix) {
        String key = prefix + "_";
        if (day <= 3) {
            basicMap.get(key + "d_cnt_3").add(appApkName);
            basicMap.get(key + "d_cnt_5").add(appApkName);
            basicMap.get(key + "d_cnt_7").add(appApkName);
            basicMap.get(key + "d_cnt_10").add(appApkName);
            basicMap.get(key + "d_cnt_15").add(appApkName);
        } else if (day <= 5) {
            basicMap.get(key + "d_cnt_5").add(appApkName);
            basicMap.get(key + "d_cnt_7").add(appApkName);
            basicMap.get(key + "d_cnt_10").add(appApkName);
            basicMap.get(key + "d_cnt_15").add(appApkName);
        } else if (day <= 7) {
            basicMap.get(key + "d_cnt_7").add(appApkName);
            basicMap.get(key + "d_cnt_10").add(appApkName);
            basicMap.get(key + "d_cnt_15").add(appApkName);
        } else if (day <= 10) {
            basicMap.get(key + "d_cnt_10").add(appApkName);
            basicMap.get(key + "d_cnt_15").add(appApkName);
        } else if (day <= 15) {
            basicMap.get(key + "d_cnt_15").add(appApkName);
        }
    }

    public void addInstDayCmpHfqSet(String hfq_tag, AppApkObject appApkObj) {
        Integer cmp_day = appApkObj.getInst_day_cmp_hfq();
        if (cmp_day != null) {
            String app_apk = appApkObj.getApp_apk();
            String duration = "init";

            // _inst_d_cnt_
            String dKey = hfq_tag + "_inst_d_cnt_";
            if (cmp_day == 2) {
                duration = "2th";
                HashSet<String> d2Set = basicMap.get(dKey + duration);
                if (d2Set != null) {
                    d2Set.add(app_apk);
                }
            }

            // _inst_mm_cnt_
            String mmKey = hfq_tag + "_inst_mm_cnt_";
            if (cmp_day >= 31 && cmp_day <= 60) {
                duration = "2th";
                HashSet<String> mm2Set = basicMap.get(mmKey + duration);
                if (mm2Set != null) {
                    mm2Set.add(app_apk);
                }
            } else if (cmp_day >= 151 && cmp_day <= 180) {
                duration = "6th";
                HashSet<String> mm6Set = basicMap.get(mmKey + duration);
                if (mm6Set != null) {
                    mm6Set.add(app_apk);
                }
            }
        }
    }

    /** prefix = bank + is_aft_hfq + inst */
    public void addDayPartSet(String appApkName, Integer day, String prefix) {
        if (day != null) {
            String diffDay = getDiffDay(day);
            if (diffDay != null) {
                String key = prefix + "_" + diffDay;
                basicMap.get(key).add(appApkName);
            }
            addDayRangeSet(appApkName, day, prefix);
        }
    }

    private String getDiffMon(Integer month) {
        if (month >= 1 && month <= 6) {
            return "m_cnt_" + month + "th";
        }
        return null;
    }

    private String addMonthRangeSet(String appApkName, Integer month, String type) {
        String key = type + "_";
        if (month <= 3) {
            basicMap.get(key + "m_cnt_3").add(appApkName);
            basicMap.get(key + "m_cnt_6").add(appApkName);
            basicMap.get(key + "m_cnt_9").add(appApkName);
            basicMap.get(key + "m_cnt_12").add(appApkName);
            basicMap.get(key + "m_cnt_24").add(appApkName);
        } else if (month <= 6) {
            basicMap.get(key + "m_cnt_6").add(appApkName);
            basicMap.get(key + "m_cnt_9").add(appApkName);
            basicMap.get(key + "m_cnt_12").add(appApkName);
            basicMap.get(key + "m_cnt_24").add(appApkName);
        } else if (month <= 9) {
            basicMap.get(key + "m_cnt_9").add(appApkName);
            basicMap.get(key + "m_cnt_12").add(appApkName);
            basicMap.get(key + "m_cnt_24").add(appApkName);
        } else if (month <= 12) {
            basicMap.get(key + "m_cnt_12").add(appApkName);
            basicMap.get(key + "m_cnt_24").add(appApkName);
        } else if (month <= 24) {
            basicMap.get(key + "m_cnt_24").add(appApkName);
        }
        return null;
    }

    //    private String transforDiffMonRange(Integer month) {
    //        if(month <= 3) {
    //            return "m_cnt_3";
    //        } else if(month <= 6){
    //            return "m_cnt_6";
    //        } else if(month <= 9){
    //            return "m_cnt_9";
    //        } else if(month <= 12){
    //            return "m_cnt_12";
    //        } else if(month <= 24){
    //            return "m_cnt_24";
    //        }
    //        return null;
    //    }

    public void addMonPartSet(String appApkName, Integer month, String type, String cate) {
        if (month != null) {
            String diffMon = getDiffMon(month);

            if (diffMon != null) {
                String key = type + "_" + diffMon;
                basicMap.get(key).add(appApkName);
            }

            if (!type.contains("hfq")) {
                addMonthRangeSet(appApkName, month, type);
            }

            //            if(!cate.equals(TAGBANK) && !cate.equals(TAGLOAN)) {
            //                addMonthRangeSet(appApkName, month, type);
            //            }
        }
    }

    public void addHourPartSet(String appApkName, String hourPart, String type) {
        String key = type + "_" + hourPart;
        addKeySet(key, appApkName);
    }

    private void calcuInstDListProp() {
        int size = inst_d_list.size();
        if (size > 0) {
            Collections.sort(inst_d_list);
            inst_d_min = inst_d_list.getFirst();
            inst_d_max = inst_d_list.getLast();
            if (size % 2 == 0) {
                int end = size / 2;
                int start = (size / 2) - 1;
                inst_d_medium = ((inst_d_list.get(start) + inst_d_list.get(end)) / (double) 2);
            } else {
                inst_d_medium = (double) inst_d_list.get((size - 1) / 2);
            }
        }
    }

    private void calcuInstMListProp() {
        int size = inst_m_list.size();
        if (size > 0) {
            Collections.sort(inst_m_list);
            inst_m_min = inst_m_list.getFirst();
            inst_m_max = inst_m_list.getLast();
            if (size % 2 == 0) {
                int end = size / 2;
                int start = (size / 2) - 1;
                inst_m_medium = ((inst_m_list.get(start) + inst_m_list.get(end)) / (double) 2);
            } else {
                inst_m_medium = (double) inst_m_list.get((size - 1) / 2);
            }
        }
    }

    private void calcuUpdtDListProp() {
        int size = updt_d_list.size();
        if (size > 0) {
            Collections.sort(updt_d_list);
            updt_d_min = updt_d_list.getFirst();
            updt_d_max = updt_d_list.getLast();
            if (size % 2 == 0) {
                int end = size / 2;
                int start = (size / 2) - 1;
                updt_d_medium = ((updt_d_list.get(start) + updt_d_list.get(end)) / (double) 2);
            } else {
                updt_d_medium = (double) updt_d_list.get((size - 1) / 2);
            }
        }
    }

    private void calcuUpdtMListProp() {
        int size = updt_m_list.size();
        if (size > 0) {
            Collections.sort(updt_m_list);
            updt_m_min = updt_m_list.getFirst();
            updt_m_max = updt_m_list.getLast();
            if (size % 2 == 0) {
                int end = size / 2;
                int start = (size / 2) - 1;
                updt_m_medium = ((updt_m_list.get(start) + updt_m_list.get(end)) / (double) 2);
            } else {
                updt_m_medium = (double) updt_m_list.get((size - 1) / 2);
            }
        }
    }

    public void calcuTotalLabel() {

        formatCnt();

        calcuInstDListProp();
        calcuInstMListProp();
        calcuUpdtDListProp();
        calcuUpdtMListProp();
        calcuLastInst6MonLabelErr();
        calcuLastInst7DayLabel();
        calcuLastUpdt6MonLabelErr();
        calcuLastUpdt7DayLabel();

        formatRateTot();
    }

    public void calcuCateLabel(HashMap<String, HashSet<String>> totalMap) {

        formatCnt();

        calcuInstDListProp();
        calcuInstMListProp();
        calcuUpdtDListProp();
        calcuUpdtMListProp();
        calcuLastInst6MonLabelErr();
        calcuLastInst7DayLabel();
        calcuLastUpdt6MonLabelErr();
        calcuLastUpdt7DayLabel();

        formatRateCate(totalMap);
    }

    //    private static HashMap<String, AppCategoryBasicInfo> initMapTest(){
    //        HashMap<String, AppCategoryBasicInfo> map = new HashMap<>();
    //        map.put(TAGTOT, new AppCategoryBasicInfo(TAGTOT));
    //        map.put(TAGBANK, new AppCategoryBasicInfo(TAGBANK));
    //        map.put(TAGLOAN, new AppCategoryBasicInfo(TAGLOAN));
    //        map.put(TAGBET , new AppCategoryBasicInfo(TAGBET));
    //        map.put(TAGJJSH, new AppCategoryBasicInfo(TAGJJSH));
    //        map.put(TAGJRLC, new AppCategoryBasicInfo(TAGJRLC));
    //        map.put(TAGLTSJ, new AppCategoryBasicInfo(TAGLTSJ));
    //        map.put(TAGLYJT, new AppCategoryBasicInfo(TAGLYJT));
    //        map.put(TAGNONE, new AppCategoryBasicInfo(TAGNONE));
    //        map.put(TAGSCTY, new AppCategoryBasicInfo(TAGSCTY));
    //        map.put(TAGSJYX, new AppCategoryBasicInfo(TAGSJYX));
    //        map.put(TAGSSGW, new AppCategoryBasicInfo(TAGSSGW));
    //        map.put(TAGSYGJ, new AppCategoryBasicInfo(TAGSYGJ));
    //        map.put(TAGSYSX, new AppCategoryBasicInfo(TAGSYSX));
    //        map.put(TAGTSYD, new AppCategoryBasicInfo(TAGTSYD));
    //        map.put(TAGXLBG, new AppCategoryBasicInfo(TAGXLBG));
    //        map.put(TAGXWZX, new AppCategoryBasicInfo(TAGXWZX));
    //        map.put(TAGXXJY, new AppCategoryBasicInfo(TAGXXJY));
    //        map.put(TAGXXYL, new AppCategoryBasicInfo(TAGXXYL));
    //        map.put(TAGYLJK, new AppCategoryBasicInfo(TAGYLJK));
    //        map.put(TAGYYST, new AppCategoryBasicInfo(TAGYYST));
    //        return map;
    //    }

    public static void main(String[] args) {
        //        HashMap<String, AppCategoryBasicInfo> resMap = initMapTest();
        //
        //        Set<String> keySets = resMap.keySet();
        //        for (String key: keySets) {
        //            System.out.println("Cate: " + key);
        //            AppCategoryBasicInfo basicInfo = resMap.get(key);
        //            HashMap<String, HashSet<String>> basicMap = basicInfo.getBasicMap();
        //            if(basicMap != null ){
        //                Set<String> keySet = basicMap.keySet();
        //                System.out.println("keySet Size: " + keySet.size());
        //                for (String set : keySet) {
        //                    System.out.println(key+"_" + set);
        //                }
        //            } else {
        //                System.out.println("##error: " + key + " basiceMap is null");
        //            }
        //        }

    }
}
